<?php

header('Content-Type: text/html;charset=utf-8');

$title = $_POST['title'];
$content = $_POST['content'];

$url  =  'http://localhost/lessone14/03/' ;
$host =  'http://'.$_SERVER['HTTP_HOST'].'/lessone14/03/';



if($url != $host){
    echo '非法操作,你不是通过本站提交的';
}else{
	
     if ($title == '' || $content == '') {
		  echo '不可以提交空数据';
		  header("refresh:2;url=index.php");
		  exit;
	  } else {
		  echo '提交成功！';
		  header("refresh:2;url=index.php");
		  exit;
  }
  
}

?>